DataGrid - Performance is slow if a large number of summaries is used (T1316562)#32921
Merged
dmirgaev merged 10 commits intoDevExpress:26_1from Mar 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves DataGrid group summary performance by avoiding repeated columnsController.columnOption(...) lookups when many summary items are configured (T1316562), replacing them with a precomputed column lookup Map.
Changes:
- Added a cached column lookup map built once per group-items processing cycle and reused during summary cell calculation.
- Introduced internal summary types (
SummaryItem,ColumnMap) and a small map lookup helper. - Added Jest unit + integration coverage for the new utilities and the performance optimization.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/data_grid/summary/utils.ts | Adds getColumnFromMap helper for map-based column lookup. |
| packages/devextreme/js/__internal/grids/data_grid/summary/types.ts | Adds internal SummaryItem and ColumnMap typings for the optimization. |
| packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts | Builds and reuses a column lookup map to reduce repeated columnOption calls during group summary rendering. |
| packages/devextreme/js/__internal/grids/data_grid/summary/tests/utils.test.ts | Adds unit tests for getSummaryCellIndex and getColumnFromMap. |
| packages/devextreme/js/__internal/grids/data_grid/summary/tests/m_summary.integration.test.ts | Adds an integration test asserting fewer columnOption calls on refresh with many group summaries. |
...ges/devextreme/js/__internal/grids/data_grid/summary/__tests__/m_summary.integration.test.ts
Show resolved
Hide resolved
Alyar666
requested changes
Mar 17, 2026
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
dc1d23a to
357f2bd
Compare
357f2bd to
e00afd1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a column lookup map to speed up DataGrid group summary processing when many summary items are configured, reducing repeated columnOption lookups during group row rendering/refresh.
Changes:
- Added a
ColumnMaplookup mechanism and helper (getColumnFromMap) to avoid repeatedcolumnOptioncalls. - Implemented
_buildColumnLookupMap()and routed group summary cell calculation through the map. - Added Jest unit tests for summary utils and an integration test to validate the optimization behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/devextreme/js/__internal/grids/data_grid/summary/utils.ts |
Adds getColumnFromMap helper for map-based column resolution. |
packages/devextreme/js/__internal/grids/data_grid/summary/types.ts |
Introduces SummaryItem and ColumnMap types used by the optimization. |
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts |
Builds/passes a column lookup map into group summary cell calculation to reduce columnOption calls. |
packages/devextreme/js/__internal/grids/data_grid/summary/__tests__/utils.test.ts |
Adds unit coverage for getSummaryCellIndex and getColumnFromMap. |
packages/devextreme/js/__internal/grids/data_grid/summary/__tests__/m_summary.integration.test.ts |
Adds an integration test asserting fewer columnOption calls on refresh with many summaries. |
...ges/devextreme/js/__internal/grids/data_grid/summary/__tests__/m_summary.integration.test.ts
Show resolved
Hide resolved
...ges/devextreme/js/__internal/grids/data_grid/summary/__tests__/m_summary.integration.test.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/summary/m_summary.ts
Outdated
Show resolved
Hide resolved
Alyar666
previously approved these changes
Mar 20, 2026
anna-shakhova
previously approved these changes
Mar 20, 2026
anna-shakhova
approved these changes
Mar 20, 2026
dmirgaev
added a commit
to dmirgaev/DevExtreme
that referenced
this pull request
Mar 20, 2026
dmirgaev
added a commit
to dmirgaev/DevExtreme
that referenced
this pull request
Mar 20, 2026
dmirgaev
added a commit
to dmirgaev/DevExtreme
that referenced
this pull request
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.